
Page({
  onLoad(options) {
    wx.hideHomeButton()
    if (options.q) {
      const qrUrl = decodeURIComponent(options.q);
      const params = qrUrl.split('?')[1].split('&');
      params.forEach(item => {
        const [key, value] = item.split('=');
        if (key === 'placementPointId') {
          wx.setStorageSync('placementPointId', value)
        }
      });
    }
  },
  handleOrderClick: function () {
    wx.showToast({
      title: '正在跳转下单页面',
      icon: 'loading',
      duration: 1500,
      success: () => {
        setTimeout(() => {
          wx.switchTab({
            url: '../goods/goods',
          })
        }, 1500);
      }
    });
  }
})
